-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Many] Migrate non examples (and pigeon test) to java 17 #10201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Many] Migrate non examples (and pigeon test) to java 17 #10201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request migrates a number of packages to Java 17. This includes updating build.gradle
files to set Java 17 compatibility, updating pubspec.yaml
files with new SDK constraints, and adding corresponding changelog entries. The PR also updates the gradle-check
tool to enforce these new Java 17 requirements, including a check for kotlinOptions
configuration. My review focuses on improving the robustness of the updated tool script.
final bool hasCompabilityVersions = gradleLines.any((String line) => | ||
line.contains('sourceCompatibility') && !_isCommented(line)) && | ||
line.contains('sourceCompatibility = JavaVersion.VERSION_$requiredJavaVersion') && !_isCommented(line)) && | ||
// Newer toolchains default targetCompatibility to the same value as | ||
// sourceCompatibility, but older toolchains require it to be set | ||
// explicitly. The exact version cutoff (and of which piece of the | ||
// toolchain; likely AGP) is unknown; for context see | ||
// https://github.com/flutter/flutter/issues/125482 | ||
gradleLines.any((String line) => | ||
line.contains('targetCompatibility') && !_isCommented(line)); | ||
line.contains('targetCompatibility = JavaVersion.VERSION_$requiredJavaVersion') && !_isCommented(line)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
final bool kotlinOptionsUsesJavaVersion = gradleLines.any((String line) => | ||
line.contains('jvmTarget = JavaVersion.VERSION_$requiredJavaVersion') && | ||
!_isCommented(line)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
final bool kotlinOptionsUsesJavaVersion = gradleLines.any((String line) => | ||
line.contains('jvmTarget = JavaVersion.VERSION_$requiredJavaVersion') && | ||
!_isCommented(line)); | ||
// Either does not set kotlinOptions or does and uses non-string based syntax. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1045ced
to
5ec1943
Compare
autosubmit label was removed for flutter/packages/10201, because - The status or check suite Linux repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
autosubmit label was removed for flutter/packages/10201, because - The status or check suite Linux_android android_platform_tests_shard_2 master has failed. Please fix the issues identified (or deflake) before re-applying this label. |
autosubmit label was removed for flutter/packages/10201, because - The status or check suite Linux_android android_platform_tests_shard_2 master has failed. Please fix the issues identified (or deflake) before re-applying this label. |
autosubmit label was removed for flutter/packages/10201, because - The status or check suite Mac_x64 build_all_packages stable has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
I filed an issue for the repeated infra failures mac tests flutter/flutter#176914 |
The failing "Linux_web web_platform_tests_wasm_shard_1 master" is google_sign_in_web which is a package that is not touched in is pr. Discord thread it looks like this test has flaked on the main dashboard as well. https://discord.com/channels/608014603317936148/608020293944082452/1427377579500896278 |
Tracked in flutter/flutter#176299 |
Detected the If you add the The "Merge" button is also unlocked. To bypass presubmits as well as the tree status, press the GitHub "Add to Merge Queue". |
1 similar comment
Detected the If you add the The "Merge" button is also unlocked. To bypass presubmits as well as the tree status, press the GitHub "Add to Merge Queue". |
I talked with @stuartmorgan-g out of band and we agreed to land this pr on red because the nature of the flakes is not something we want to wait on. The flakes are appear to be either out of band or no known root cause. The number of packages impacted here is large and the risk is minimal. Tooling support is being expanded in #10206 |
Fixes flutter/flutter/issues/176027
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].///
).